<?php
namespace Auth\Controller;
use Common\Controller\ApiController;
use Common\Service\LoginService;
class UserController extends ApiController {

   public function read(){
       $id = 2;
       die(I('get.id'));
   }
    public function lists(){
        $this->_loadModel();
        $where = $this->_search();
        $this->_filter($where);
        $this->_page();
        $total = $this->_model->pageCount($where);
        $list = $this->_model->pageSelect($where, $this->_pager, $this->_limit, $this->_order);
        $data =  array(
            'list' => $list,
            'total' => $total
        );
        $this->response($data, $this->_type);
    }
    /**
     * 加载 Model
     *
     */
    protected function _loadModel() {
        if(!$this->_model) $this->_model = D('Common/Sys/'.CONTROLLER_NAME);
    }
}